package com.ruoyi.examination.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.examination.mapper.PaperQuestionRelationMapper;
import com.ruoyi.examination.domain.PaperQuestionRelation;
import com.ruoyi.examination.service.IPaperQuestionRelationService;

/**
 * 试卷试题关系Service业务层处理
 * 
 * @author hcc
 * @date 2025-10-21
 */
@Service
public class PaperQuestionRelationServiceImpl implements IPaperQuestionRelationService 
{
    @Autowired
    private PaperQuestionRelationMapper paperQuestionRelationMapper;

    /**
     * 查询试卷试题关系
     * 
     * @param paperQuestionId 试卷试题关系主键
     * @return 试卷试题关系
     */
    @Override
    public PaperQuestionRelation selectPaperQuestionRelationByPaperQuestionId(String paperQuestionId)
    {
        return paperQuestionRelationMapper.selectPaperQuestionRelationByPaperQuestionId(paperQuestionId);
    }

    /**
     * 查询试卷试题关系列表
     * 
     * @param paperQuestionRelation 试卷试题关系
     * @return 试卷试题关系
     */
    @Override
    public List<PaperQuestionRelation> selectPaperQuestionRelationList(PaperQuestionRelation paperQuestionRelation)
    {
        return paperQuestionRelationMapper.selectPaperQuestionRelationList(paperQuestionRelation);
    }

    /**
     * 新增试卷试题关系
     * 
     * @param paperQuestionRelation 试卷试题关系
     * @return 结果
     */
    @Override
    public int insertPaperQuestionRelation(PaperQuestionRelation paperQuestionRelation)
    {
        return paperQuestionRelationMapper.insertPaperQuestionRelation(paperQuestionRelation);
    }

    /**
     * 修改试卷试题关系
     * 
     * @param paperQuestionRelation 试卷试题关系
     * @return 结果
     */
    @Override
    public int updatePaperQuestionRelation(PaperQuestionRelation paperQuestionRelation)
    {
        return paperQuestionRelationMapper.updatePaperQuestionRelation(paperQuestionRelation);
    }

    /**
     * 批量删除试卷试题关系
     * 
     * @param paperQuestionIds 需要删除的试卷试题关系主键
     * @return 结果
     */
    @Override
    public int deletePaperQuestionRelationByPaperQuestionIds(String[] paperQuestionIds)
    {
        return paperQuestionRelationMapper.deletePaperQuestionRelationByPaperQuestionIds(paperQuestionIds);
    }

    /**
     * 删除试卷试题关系信息
     * 
     * @param paperQuestionId 试卷试题关系主键
     * @return 结果
     */
    @Override
    public int deletePaperQuestionRelationByPaperQuestionId(String paperQuestionId)
    {
        return paperQuestionRelationMapper.deletePaperQuestionRelationByPaperQuestionId(paperQuestionId);
    }
}
